package swag.t;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.widget.Toast;

public class Pixel {

private int x,y, sidelength, color;

private Context cxt;
	
private Bitmap img;

public Pixel(int x, int y, int sidelength, int color, Context context, int Drawable) {
	this.x = x;
	this.y = y;
	this.color = color;
	this.sidelength = sidelength;
	BitmapFactory.Options ops = new BitmapFactory.Options();
	ops.inJustDecodeBounds = true;
	Bitmap temp = BitmapFactory.decodeResource(context.getResources(),Drawable);
double width = sidelength *1.5; 
double height = sidelength * 1.5;
	img=Bitmap.createScaledBitmap(temp, (int) width , (int) height , false);

}
public Bitmap getImage()
{
	return img;
	
}

public void move(float f, float g, Ball ball1)
{
	//System.out.println(img.getWidth());
	
	//if(Math.abs(ball1.getx()-x)<ball1.getradius() && Math.abs(y-ball1.gety())<ball1.getradius())
//	{
//		Toast.makeText(cxt, "GoodWork!", Toast.LENGTH_SHORT).show();
		
//	}
}
	
	

	

public void setx(int x2)
{
 x =x2;	
}

public void sety(int y2)
{
y = y2;
}

public void setsidelength(int sidelength2)
{
	sidelength = sidelength2;
}

public void color(int color2)
{
	color = color2;
}

public int getx()
{
	return x;
}

public int gety()
{
	return y;
}

public int getcolor()
{
	return color;
}

public int getsidelength()
{
	return sidelength;
}

}
